Repository navigation
build: Upgrade depends to Qt6 - #231
kwsantiago wants to merge 47 commits into
Conversation
|
This shouldn't have the wintaskbar changes - isolate that to the other PR |
32ad8cd to
a975bc0
Compare
0b5e2aa to
ed0e1fc
Compare
|
Annoyingly, it looks like Qt does not allow open source projects to use LTS or even stable branches, which forces us to be the guinea pigs... only their latest version (currently 6.10.2) is up to date on fixes. Which leads me to think we might actually be better off with 5.15. We still have to track security vulnerabilities for it somewhat manually (Qt is still maintaining it commercially), but at least there isn't a constant wave of new features introducing new bugs. The problem then is that Qt 5 isn't up to par on HiDPI or "dark mode" support. So in the end, Qt 6 is the only real option. :( But let's try to at least stay close to Core on this for now. I'm expecting a branch to look like this: v29.3.knots20260203rc1...luke-jr:bitcoin:knots-qt6-experiment-20260204 Mind you, that branch does NOT build currently (due to some freetype issue). But it would be a good starting point to remake this with. |
Github-Pull: bitcoin#30997 Rebased-From: 5e794e6
This change helps avoid patch duplication between a package and its native counterpart. Github-Pull: bitcoin#30997 Rebased-From: 0268f52
Github-Pull: bitcoin#30997 Rebased-From: 248613e
Unlike Qt 5, Qt 6 requires a separate native Qt build for cross-building. See: https://www.qt.io/blog/qt-6-build-system. Github-Pull: bitcoin#30997 Rebased-From: ab399c4
1. Do not set `C{PLUS}_INCLUDE_PATH` variables
The build system for Qt 6 differs entirely from that of Qt 5. Building a
set of native Qt 6 tools now forms a separate step when cross-compiling.
Under these new circumstances, the `C{PLUS}_INCLUDE_PATH` environment
variables may alter the default include directories for both native and
cross compilers.
Previously, we explicitly unset these variables when invoking clang for
cross-compiling; however, that approach proved suboptimal (see bitcoin#30451).
This change sets the native toolchain for dependencies explicitly,
rather than relying on the `C{PLUS}_INCLUDE_PATH` environment variables.
Additionally, it facilitates the transition towards using clang for
building native tools when cross-compiling for macOS.
2. Add `ninja` package.
3. Adjust allowed symbol lists.
Github-Pull: bitcoin#30997
Rebased-From: 551e13a
Github-Pull: bitcoin#30997 Rebased-From: 629d292
Github-Pull: bitcoin#30997 Rebased-From: 30dd1f1
Github-Pull: bitcoin#30997 Rebased-From: 80b9179
Github-Pull: bitcoin#30997 Rebased-From: f003457
Github-Pull: bitcoin#30997 Rebased-From: 6d42149
On older systems, such as Ubuntu 22.04, `qt6-tools-dev-tools` and `libgl-dev` are not treated as dependencies of `qt6-tools-dev` and `qt6-base-dev`, respectively. This change explicitly lists them in the installation documentation. Github-Pull: bitcoin#32211 Rebased-From: 2e751f5
This change updates the vcpkg manifest baseline from the "2024.09.30 Release" to the "2025.03.19 Release", with the following package changes: - boost: 1.85.0#1,2 --> 1.87.0 - qtbase: 6.7.2#3 -> 6.8.2#1 - qttools: 6.7.2#1 -> 6.8.2 - sqlite3: 3.46.1 --> 3.49.1 Github-Pull: bitcoin#32213 Rebased-From: fe5a6dc
This change makes vcpkg skip unused features such as `dnslookup`, `openssl`, etc. Github-Pull: bitcoin#32213 Rebased-From: d85895e
This change fixes cross-compilation from macOS to macOS with another architecture. Github-Pull: bitcoin#32215 Rebased-From: 690f5da
Github-Pull: bitcoin#32215 Rebased-From: d0cce41
Github-Pull: bitcoin#32357 Rebased-From: 35e57fb
Extend `getFrameworks()` with an optional `rpath` parameter to replace `@rpath` in dependency paths. This fixes resolution of framework dependencies when using Homebrew's `qt@6` package. Github-Pull: bitcoin#32287 Rebased-From: 938208d
Homebrew’s `qt@6` package places the `translations` and `plugins` directories in the `share/qt` subdirectory. This change updates the `macdeployqtplus` script accordingly. Github-Pull: bitcoin#32287 Rebased-From: fad57e9
Otherwise we end up with ~1.5GB of binaries (Linux) when DEBUG=1.. Github-Pull: bitcoin#33304 Rebased-From: c9d5f21
Modern Ubuntu isn't shipping with this library installed by default. Staticly link it to remove the need for end-users to install it. Closes bitcoin#33432. Github-Pull: bitcoin#33434 Rebased-From: eca5085
Github-Pull: bitcoin#33906 Rebased-From: 8558902
Looks like this was fixed in 6.5 or 6.6, via https://codereview.qt-project.org/c/qt/qtbase/+/492580. Github-Pull: bitcoin#33860 Rebased-From: 3e9aca6
Github-Pull: bitcoin#33865 Rebased-From: 0dd8d5c
Replace the unreliable https://code.qt.io with the GitHub mirror link. Github-Pull: bitcoin#33918 Rebased-From: 50cbde3
Rebased-From: 3c63cbf
See: - qt/qtbase@30e0434 - https://bugreports.qt.io/browse/QTBUG-119901 Rebased-From: 1c4eea6
ed0e1fc to
c7365fb
Compare
|
@luke-jr Rebased on your branch. Issue was dbus/wayland, not freetype. Builds now with |
- chmod +x CentOS Qt5 CI setup script (lint-files.py) - add NO_QR=1 to CentOS DEP_OPTS so toolchain sets WITH_QRENCODE=OFF (qrencode not built by depends when NO_QT=1) - add compiler-rt __isPlatformVersionAtLeast shim for macOS cross builds (Qt6 Cocoa plugin uses @available() which needs this compiler builtin not available when cross-compiling from Linux with clang + lld)
| sudo apt-get install clang ccache build-essential cmake ninja-build pkgconf python3-zmq libevent-dev libboost-dev libsqlite3-dev libdb++-dev systemtap-sdt-dev libminiupnpc-dev libzmq3-dev qt6-base-dev qt6-tools-dev qt6-l10n-tools libqrencode-dev -y | ||
| - name: Compile and run tests | ||
| run: | | ||
| # Run tests on commits after the last merge commit and before the PR head commit |
There was a problem hiding this comment.
From CodeRabbit:
Keep -DWARN_INCOMPATIBLE_BDB=OFF in this job
.github/workflows/ci.yml:92 still configures WITH_BDB=ON, and CMakeLists.txt fatal-errors on non-4.8 BDB unless this flag is disabled. libdb++-dev on Ubuntu 24.04 is BDB 5.3, so dropping it will make this CI leg fail at configure time.
| $(package)_config_opts += -no-feature-designer | ||
| $(package)_config_opts += -no-feature-pixeltool | ||
| $(package)_config_opts += -no-feature-qdoc | ||
| $(package)_config_opts += -no-feature-qtattributionsscanner | ||
| $(package)_config_opts += -no-feature-qtdiag | ||
| $(package)_config_opts += -no-feature-qtplugininfo |
There was a problem hiding this comment.
From CodeRabbit:
Make extraction directory creation idempotent.
After a partial extraction, rerunning this recipe fails at mkdir qtbase (or the other plain mkdir calls) instead of reusing the existing directories. Use mkdir -p so interrupted dependency builds can be retried.
- mkdir qtbase && \
- mkdir -p qtbase &&
...
- mkdir qttranslations && \
- mkdir -p qttranslations &&
...
- mkdir qttools && \
- mkdir -p qttools &&
...
- mkdir cmake && \
- mkdir -p cmake && \
|
|
||
| #### GUI Dependencies | ||
| ###### Qt5 | ||
| ###### Qt6 |
There was a problem hiding this comment.
From CodeRabbit:
Fix the heading level jump.
Line 65 uses H6 immediately under the H4 GUI Dependencies heading, skipping H5 and triggering markdownlint MD001. Use ##### Qt6.
|
|
||
| #### GUI Dependencies | ||
| ###### Qt5 | ||
| ###### Qt6 |
There was a problem hiding this comment.
From Code Rabbit:
Fix the heading level jump.
Line 67 uses H6 immediately under the H4 GUI Dependencies heading, skipping H5 and triggering markdownlint MD001. Use ##### Qt6.
|
|
||
| #### GUI Dependencies | ||
| ###### Qt5 | ||
| ###### Qt6 |
There was a problem hiding this comment.
From Code Rabbit:
Fix the heading level jump.
Line 67 uses H6 immediately under the H4 GUI Dependencies heading, skipping H5 and triggering markdownlint MD001. Use ##### Qt6.
|
|
||
| sudo apt install qtwayland5 | ||
| sudo apt install qt6-wayland | ||
|
|
There was a problem hiding this comment.
From CodeRabbit:
Use fenced code blocks for the new commands.
Lines 85-89 and 140-144 use indented code blocks, triggering markdownlint MD046. Convert each command block to a fenced bash block.
Also applies to: 140-144
| | [MiniUPnPc](../depends/packages/miniupnpc.mk) (networking) | [link](https://miniupnp.tuxfamily.org/) | [2.2.7](https://github.com/bitcoin/bitcoin/pull/29707) | 2.1 | No | | ||
| | [qrencode](../depends/packages/qrencode.mk) (gui) | [link](https://fukuchi.org/works/qrencode/) | [4.1.1](https://github.com/bitcoin/bitcoin/pull/27312) | N/A | No | | ||
| | [Qt](../depends/packages/qt.mk) (gui) | [link](https://download.qt.io/archive/qt/) | 5.15.18 | [5.11.3](https://github.com/bitcoin/bitcoin/pull/24132) | No | | ||
| | [Qt](../depends/packages/qt.mk) (gui) | [link](https://download.qt.io/archive/qt/) | [6.7.3](https://github.com/bitcoin/bitcoin/pull/30997) | [6.2](https://github.com/bitcoin/bitcoin/pull/30997) | No | |
There was a problem hiding this comment.
From CodeRabbit:
Use descriptive link labels.
The touched rows still use generic [link] text, triggering MD059 and reducing accessibility. Replace it with labels such as [MiniUPnP], [qrencode], and [Qt].
|
A "bit" from CodeRabbit for .github/workflows/ci.yml: Workflow has no explicit permissions: block. zizmor flags this job as running with default (overly broad) GITHUB_TOKEN permissions since no permissions: block is defined at the workflow or job level. Scoping this down (e.g., contents: read) follows least-privilege practice for the token used by these steps. |
Upgrades the depends system to build Qt 6.7.3, preparing the codebase for Qt6 compatibility.
Changes
Details
This PR modernizes the Qt dependency infrastructure without changing application behavior. The Qt6 upgrade provides: